package com.kob.design.decorator;

/**
 * @Description: 鸡蛋类，具体装饰者
 * @Author: fyt
 * @Date: 2024/4/16 17:30
 **/
public class Egg extends Garnish {
    public Egg(FastFood fastFood) {
        super(1, "鸡蛋", fastFood);
    }

    public float cost() {
        return getPrice()+getFastFood().cost();
    }

    @Override
    public String getDesc() {
        return super.getDesc() + getFastFood().getDesc();
    }
}
